/**
 * 

 */
package edu.vt.ece.rt.quorum.util;

import java.util.concurrent.atomic.AtomicBoolean;

import edu.vt.ece.rt.quorum.tree.Node;

/**
 * 
 * @author Sudhanshu
 *
 */
public class Nodex {
	Node node;
	Long distance;
	AtomicBoolean waitPoint;
	
	public Nodex(Node n){
		node = n;
		waitPoint = new AtomicBoolean(false);
		distance = new Long(0);
	}
	
	public void setWaitPoint(AtomicBoolean b){
		waitPoint = b;
	}
	
	public AtomicBoolean getWaitPoint(){
		return waitPoint;
	}
	
	public void setDistance(Long d){
		distance = d;		
	}
	
	public void setNotRunning(){
		node.setAccess(false);
	}

	/**
	 * @return
	 */
	public long getdistance() {
		return distance;
	}
}
